package lab01;

/**
 * Created by 星月 on 2017/10/7.
 */
public class Test05 {
    public static void main(String[] args) {
        int i=0;
        int n=100;
        int sum = 0;
        for(;i<=n;i++){                   //for语句
            sum+=i;
           System.out.println(sum);
        }
        while (i<=n){                     //while语句
            sum+=i;
            i++;
            System.out.println(sum);
        }
        do{                              //do...while语句
            sum+=i;
            System.out.println(sum);
            i++;
        }while (i<=n);

    }
}
